package com.ruoyi.inventory.service.impl;

import java.util.List;

import com.ruoyi.inventory.domain.TInventoryAllot;
import com.ruoyi.inventory.mapper.TInventoryAllotMapper;
import com.ruoyi.inventory.service.ITInventoryAllotService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 调拨Service业务层处理
 * 
 * @author cy
 * @date 2024-10-28
 */
@Service
public class TInventoryAllotServiceImpl implements ITInventoryAllotService
{
    @Autowired
    private TInventoryAllotMapper tInventoryAllotMapper;

    /**
     * 查询调拨
     * 
     * @param id 调拨主键
     * @return 调拨
     */
    @Override
    public TInventoryAllot selectTInventoryAllotById(Long id)
    {
        return tInventoryAllotMapper.selectTInventoryAllotById(id);
    }

    /**
     * 查询调拨列表
     * 
     * @param tInventoryAllot 调拨
     * @return 调拨
     */
    @Override
    public List<TInventoryAllot> selectTInventoryAllotList(TInventoryAllot tInventoryAllot)
    {
        return tInventoryAllotMapper.selectTInventoryAllotList(tInventoryAllot);
    }

    /**
     * 新增调拨
     * 
     * @param tInventoryAllot 调拨
     * @return 结果
     */
    @Override
    public int insertTInventoryAllot(TInventoryAllot tInventoryAllot)
    {
        return tInventoryAllotMapper.insertTInventoryAllot(tInventoryAllot);
    }

    /**
     * 修改调拨
     * 
     * @param tInventoryAllot 调拨
     * @return 结果
     */
    @Override
    public int updateTInventoryAllot(TInventoryAllot tInventoryAllot)
    {
        return tInventoryAllotMapper.updateTInventoryAllot(tInventoryAllot);
    }

    /**
     * 删除调拨信息
     * 
     * @param id 调拨主键
     * @return 结果
     */
    @Override
    public int deleteTInventoryAllotById(Long id)
    {
        return tInventoryAllotMapper.deleteTInventoryAllotById(id);
    }

    @Override
    public int upInventoryAllot(Integer approvalStatus, Integer allotStatus, String document) {
        return tInventoryAllotMapper.upInventoryAllot(approvalStatus,allotStatus,document);
    }
}
